<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html lang="en" class="app">
<head>  
  <meta />
  <title>类别管理－商家列表</title>
  <meta name="description" content="app, web app, responsive, admin dashboard, admin, flat, flat ui, ui kit, off screen nav" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> 
  
  <jsp:include page="../lbi/common.jsp"></jsp:include>
  <script src="<c:url value="/js/uploadPreview.js"/>"></script>
  
</head>
<body class="" style="position: relative;">
    <!--新增代码-->
    <div class="sgtk4" style="display: none;">
        <div class="jineng">
            <h5>新增</h5>
            <p>
                <span>一级类目：<input type="text" id="name" required="required"/></span>
                <span id="tips"></span>
            </p>
            <p>
                <button class="btn01" onclick="saveBusinessCategory()">保存</button>
                <button class="btn02">取消</button>
            </p>
        </div>
    </div>
    <div class="sgtk3" style="display: none;">
        <div class="jineng">
            <h5>修改</h5>
                <input type="hidden" id="id" value="0">
            <p><span>一级类目：<input type="text" id="uName" required="required"/></span><span id="tips2"></span></p>
            <p><button class="btn01" onclick="updateBusinessCategory()">保存</button><button class="btn02">取消</button></p>
        </div>
    </div>
    <form method='post' action="<c:url value="/web/toUpdateBusinessCategoryImage.do"/>" enctype="multipart/form-data">
        <input type="hidden" id="ids" name="id" value="0">
    
	    <div class="sgtk_1" style="display: none;">
			<div class="jineng">
				<div> 
					<h5>上传图片</h5>
					<div class="shangchuan">
						<div id="preview" class="zhanshi">
		                    <img id='store_logo_img' src="<c:url value="/images/logo.jpg"/>" onclick="$('#previewImg').click();"/>
		                </div>
		                
		                <div class="dianji">
		                    <input type="file" name="file" id='store_logo_input' onchange="previewImage(this)" name='store_logo' required/>
		                </div>
	                </div>
					<p><button type="submit" class="btn01">保存</button><button class="btn02">取消</button></p>
				</div>
			</div>
		</div>
		
	</form>
    <!--结束新增-->
  <section class="vbox" style="position: absolute;">
    <jsp:include page="../lbi/head.jsp" ></jsp:include>
    
    <section>
      <section class="hbox stretch">
        <!-- .aside -->
        <jsp:include page="../lbi/left.jsp" ></jsp:include>
        <!-- /.aside -->
        <section id="content">
                  <section class="hbox stretch">
                          <section id="content">
                         <section class="hbox stretch">
            <!--从这里开始复制粘贴-->
            <section class="vbox">
                <header class="header bg-white b-b clearfix">
                    <div class="row m-t-sm">
                        <div class="col-sm-8 m-b-xs">
                            <a href="javascript:void(0);" class="yiji"><button type="button" class="but"><i class="fa fa-plus"></i>&nbsp;一级类目</button></a>
                        </div>
                        <div class="col-sm-3 m-b-xs">
                            <div class="input-group">
                                <input type="text" class="input-sm form-control" id="serchName" placeholder="类目名">
                                <span class="input-group-btn">
                                  <button class="btn btn-sm btn-default" type="button" onclick="serchName()">搜索</button>
                                </span>
                            </div>
                        </div>
                        <!-- <div class="col-sm-1 m-b-xs">
                            <button type="button" class="but2">下载列表</button>
                        </div> -->
                    </div>
                </header>
                <section class="scrollable wrapper w-f">
                    <section class="panel panel-default">
                        <div class="table-responsive">
                            <table class="table table-striped m-b-none">
                                <thead>
                                <tr>
                                    <th>一级类目</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody id="heightList">
    
                                </tbody>
                            </table>
                        </div>
                    </section>
                </section>
                <footer class="footer bg-white b-t">
                    <div class="row text-center-xs">
                        <div class="col-md-6 hidden-sm">
                        </div>
                        <div class="col-md-6 col-sm-12 text-right text-center-xs">
                            <ul class="pagination pagination-sm m-t-sm m-b-none" id="page_user">
                            </ul>
                        </div>
                    </div>
                </footer>
            </section>
            <!--以上为内容-->
            <a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen" data-target="#nav"></a>
        </section>
                      </section>
    
                  </section>
             </section>
    </section>
  </section>
  </section>
  
  <script type="text/javascript" src="<c:url value="/js/web_js/category/leibie_shangjia.js"/>"></script>
    
<script>

	$("#fenlei").addClass("active");
	$("#nav_9").css('display','block');
	
	$("#fenlei_3").addClass("active2");

    $().ready(function() {
        $("#commentForm").validate();
    });
    $().ready(function() {
        $("#commentForm1").validate();
    });
    $().ready(function() {
        $("#commentForm2").validate();
    });
    
    $(".yiji").click(function(){
        $(".sgtk4").show();
    })
    $(".btn02").click(function(){
        $(".sgtk4").hide();
    })
    
    $(".xiugai").click(function(){
        $(".sgtk3").show();
    })
    $(".btn02").click(function(){
        $(".sgtk3").hide();
    })
    
    $(".btn02").click(function(){
          $(".sgtk_1").hide();
    })
    
</script>
  
</body>
</html>
